<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>Path Specification</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">
<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1">Path Specification</p>
<hr class="separator">
<div class="content">Many ChartDirector APIs expect a path for loading a file. Examples include <a href="BaseChart.setBgImage.htm">BaseChart.setBgImage</a> and the <a href="cdml.htm">CDML</a> &lt;*img*&gt; tag.<br><br>
By default, ChartDirector assumes the path to be a file system path. If a relative path is used, it will be relative to the "current working directory" determined by the operating system. This may not be the same as the directory that contains the executing code. In addition, ChartDirector will also try to search for the file by interpreting the path as a Java resource path usable by the Java ClassLoader. This allows files to be stored in JAR files.<br><br>
You may use <a href="BaseChart.setSearchPath.htm">BaseChart.setSearchPath</a> and <a href="BaseChart.setSearchPath2.htm">BaseChart.setSearchPath2</a> to specify additional file system directories and Java resource locations to search for the file.<br><br>
For web applications, <a href="BaseChart.setSearchPath3.htm">BaseChart.setSearchPath3</a> can be used to search relative to the servlet context. For applets, <a href="BaseChart.setSearchPath4.htm">BaseChart.setSearchPath4</a> can be used to search based on the "code base" or "document base" of the applet.</div><br>
<hr class="separator"><div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div></body>
</HTML>
